﻿using Architecture.Api.Application.Commands.CultureCommand;
using Architecture.Domain.Services.Interface;
using Architecture.Domain.TraceabilityManage;
using MediatR;

namespace Architecture.Api.Application.CommandHandlers.CultureHandler
{
    public class CultureQueryInfoCommandHandler : IRequestHandler<CultureQueryInfoCommand, Culture>
    {
        private readonly ICultureService _cultureService;

        public CultureQueryInfoCommandHandler(ICultureService cultureService)
        {
            _cultureService = cultureService;
        }

        public async Task<Culture> Handle(CultureQueryInfoCommand request, CancellationToken cancellationToken)
        {
            return await _cultureService.GetCultureInfo(request.productionLot);
        }
    }
}
